-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add aarch64 support #35
Conversation
So, I'd like to share my experiences with packaging docker aarch on Pine64 running DietPI. I tried to As you can see here: https://packages.debian.org/jessie/libseccomp-dev More info: Documented the steps here: As you can see on my steps, I've cloned the /docker-ce repo no /docker-ce-packaging. So my doubt is, the code from here will be merged on /docker-ce? I hope I could help, please tell if there's a misconception from my part. |
There's this too: https://github.com/moby/moby/blob/master/contrib/builder/deb/aarch64/debian-jessie/Dockerfile haven't tried yet. |
@douglasmiranda thx (sorry for the delay) will add backports on Jessie |
xD Nice! |
deb/ubuntu-zesty/Dockerfile.aarch64
Outdated
@@ -0,0 +1,28 @@ | |||
FROM multiarch/ubuntu-core:arm64-yakkety |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This for ubuntu zesty, so arm64-yakkety is incorrect image. I think using arm64v8/ubuntu:zesty is would be the best here. arm64v8/ seems to be the closest thing to official debian/ubuntu images and should probably be used elsewhere
deb/debian-jessie/Dockerfile.aarch64
Outdated
# allow replacing httpredir or deb mirror | ||
ARG APT_MIRROR=deb.debian.org | ||
RUN sed -ri "s/(httpredir|deb).debian.org/$APT_MIRROR/g" /etc/apt/sources.list | ||
RUN echo "deb http://$APT_MIRROR/debian jessie-backports main" >> /etc/apt/sources.list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps use arm64v8/debian:jessie-backports ?
Generally looks good to me. I think using the arm64v8 namespace for base images would be an improvement. |
@suihkulokki will do! |
Looks good to me now 👍 |
Any progress here? I'd like to get Debian supported. |
I'd like to see this as well, echoing @DieterReuter - one of the desired endpoints for this is an arm64 build for the Raspberry Pi 3. |
Needs a rebase |
Rebase done |
detect_alpine_image
Outdated
@@ -6,7 +6,9 @@ img="unknown" | |||
if [ "$arch" = "x86_64" ]; then | |||
img="alpine" | |||
elif [ "$arch" = "armv7l" ]; then | |||
img="arm32v6/alpine" | |||
img="armhf/alpine" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this PR shouldn't change the behaviour for other platforms. Probably an artifact of other parallel merges. Upstream already contains the changes for armv7l and aarch64.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, that was the just solved merge conflict
It's worth noting that there is work in progress to get a multiarch Alpine image, per gliderlabs/docker-alpine#304 . That's not done yet, but when it is done this will simplify the logic. |
ping @seemethere @andrewhsu @tianon PTAL |
deb/ubuntu-zesty/Dockerfile.aarch64
Outdated
@@ -0,0 +1,28 @@ | |||
FROM aarch64/ubuntu:zesty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one should be arm64v8/ubuntu
as well. 👍
detect_alpine_image
Outdated
@@ -7,6 +7,8 @@ if [ "$arch" = "x86_64" ]; then | |||
img="alpine" | |||
elif [ "$arch" = "armv7l" ]; then | |||
img="arm32v6/alpine" | |||
elif [ "$arch" = "aarch64" ]; then | |||
img="arm64v8/alpine" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block is already down a few lines 😄
deb/debian-jessie/Dockerfile.aarch64
Outdated
|
||
RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential cmake curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev libseccomp-dev pkg-config vim-common libsystemd-dev gnupg dirmngr --no-install-recommends && rm -rf /var/lib/apt/lists/* | ||
|
||
ENV GO_VERSION 1.9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency across arches, this should still be 1.8.3, shouldn't it? (and they should all be updated together?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh duh, there weren't binary releases of Go for arm64 until 1.9 -- makes more sense. 😇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, that may be an issue still; we were holding off bumping to 1.9 as there were still some issues (possibly not for all architectures though); moby/moby#33892
👍 Personally I'd be hoping to add fedora 27 support as it is creating disk images for lots of boards Maybe I can take a peek at your work and get it done sometime! |
Hmm, I'm not quite sure why this PR is still pending. Do we really have any major concerns to merge it? Or what parts should be fixed to finally accept it? I'd really love to get this in! |
@DieterReuter from my understanding it is Go 1.9 which is the first with official arm64 support. If wanted I can always build 1.8.x from source if 1.9 support is far away |
Yes maybe, but there is already a version for Ubuntu Xenial built witn Go 1.8.5, just see here https://github.com/docker/docker-ce-packaging/blob/master/deb/ubuntu-xenial/Dockerfile.aarch64. |
@meyskens wait, I think there is a new solution now! All the other .deb builds are now based upon Go v1.8.5 and actually there is a new pre-built Go v1.8.5 tarball available for armv8! Here it is https://redirector.gvt1.com/edgedl/go/go1.8.5.linux-arm64.tar.gz. So you could now use Go v1.8.5 directly. WDYT? So you just have to use
and it will work now! |
Oh hey that is nice! Changed the versions to 1.8.5 |
Just a feedback I'm using Docker aarch64 on Debian Stretch for two weeks, no issues so far. I've tried the multiarch official images; Running now: samba file server, afp file server (netatalk), boinc. Details: https://gist.github.com/douglasmiranda/6c78a82b71f626c8deb930bede6d7dfc No issues, no warnings, only joy xD |
Ping @thaJeztah. Could you please 🙏 verify internally what we have to do in order to get this PR merged in the near future? |
reping @seemethere @andrewhsu @tianon PTAL |
Checking 🤗 |
Going to squash and merge this in due to the number of commits. |
Signed-off-by: Eli Uriegas <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you so much @meyskens and everyone else that participated in this PR, sorry for the delay but happy to get more |
🎉woot! |
This PR adds aarch64/arm64 build files for Debian stretch/jessie and Ubuntu Xenial and newer.
This PR is like #25 (sorry saw it right before sending this in) but uses the golang-backports apt repo till Go builds aarch64 binaries and is not only for Ubuntu Xenial.
I tested running the .deb on Debian Stretch. Any feedback welcome.